//
// Created on 2024/5/1.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#ifndef DIANPING_CAPI_DEMO_MODELGENERATOR_H
#define DIANPING_CAPI_DEMO_MODELGENERATOR_H
#include "Model/FlowItemViewModel.h"
#include "Model/WaterFlowViewModel.h"
#include "Model/ViewModel.h"

//demo purpose, to generate model for Picasso engine. 
class ModelGenerator {
private:
    std::shared_ptr<ViewModel> generateWaterFlowViewModel();
    std::shared_ptr<ViewModel> generateFlowItemViewModel();
    ModelGenerator(){}
    static ModelGenerator* m_instance;
public:
    static ModelGenerator* GetInstance() {
        if(m_instance == NULL) {
            m_instance = new ModelGenerator();
        }
        return m_instance;
    }
    std::shared_ptr<ViewModel> PicassoModelWaterFlow(int childNo);
    std::shared_ptr<ViewModel> generateModel(ViewModelTypeE type);
};

#endif //DIANPING_CAPI_DEMO_MODELGENERATOR_H
